/*
 * Created by the DBAccessor generator.
 * Programmer: Lennart Martens
 * Date: 24/01/2008
 * Time: 16:17:52
 */
package org.hkupp.db.accessors;

import be.proteomics.util.db.interfaces.Deleteable;
import be.proteomics.util.db.interfaces.Persistable;
import be.proteomics.util.db.interfaces.Retrievable;
import be.proteomics.util.db.interfaces.Updateable;

import java.sql.*;
import java.util.HashMap;

/*
 * CVS information:
 *
 * $Revision: 1.4 $
 * $Date: 2007/07/06 09:41:53 $
 */

/**
 * This class is a generated accessor for the Peptide table.
 *
 * @author DBAccessor generator class (Lennart Martens).
 */
public class PeptideTableAccessor implements Deleteable, Retrievable, Updateable, Persistable {

	/**
	 * This variable tracks changes to the object.
	 */
	protected boolean iUpdated = false;

	/**
	 * This variable can hold generated primary key columns.
	 */
	protected Object[] iKeys = null;

	/**
	 * This variable represents the contents for the 'peptideid' column.
	 */
	protected long iPeptideid = Long.MIN_VALUE;


	/**
	 * This variable represents the contents for the 'l_spectrumid' column.
	 */
	protected long iL_spectrumid = Long.MIN_VALUE;


	/**
	 * This variable represents the contents for the 'sequence' column.
	 */
	protected String iSequence = null;


	/**
	 * This variable represents the contents for the 'modified_sequence' column.
	 */
	protected String iModified_sequence = null;


	/**
	 * This variable represents the contents for the 'score' column.
	 */
	protected Number iScore = null;


	/**
	 * This variable represents the contents for the 'percent_scored_peak_intensity' column.
	 */
	protected Number iPercent_scored_peak_intensity = null;


	/**
	 * This variable represents the contents for the 'backbone_cleavage_score' column.
	 */
	protected long iBackbone_cleavage_score = Long.MIN_VALUE;


	/**
	 * This variable represents the contents for the 'num_unused_ions' column.
	 */
	protected long iNum_unused_ions = Long.MIN_VALUE;


	/**
	 * This variable represents the contents for the 'num_fragment_ions' column.
	 */
	protected long iNum_fragment_ions = Long.MIN_VALUE;


	/**
	 * This variable represents the contents for the 'reverseScore' column.
	 */
	protected Number iReversescore = null;


	/**
	 * This variable represents the contents for the 'reverse_percent_scored_peak_intensity' column.
	 */
	protected Number iReverse_percent_scored_peak_intensity = null;


	/**
	 * This variable represents the contents for the 'deltaForwardReverseScore' column.
	 */
	protected Number iDeltaforwardreversescore = null;


	/**
	 * This variable represents the contents for the 'rank2Score' column.
	 */
	protected Number iRank2score = null;


	/**
	 * This variable represents the contents for the 'rank2_percent_scored_peak_intensity' column.
	 */
	protected Number iRank2_percent_scored_peak_intensity = null;


	/**
	 * This variable represents the contents for the 'deltaRank1Rank2Score' column.
	 */
	protected Number iDeltarank1rank2score = null;


	/**
	 * This variable represents the contents for the 'previous_aa' column.
	 */
	protected String iPrevious_aa = null;


	/**
	 * This variable represents the contents for the 'next_aa' column.
	 */
	protected String iNext_aa = null;


	/**
	 * This variable represents the contents for the 'fragmentIonMap' column.
	 */
	protected String iFragmentionmap = null;


	/**
	 * This variable represents the contents for the 'reverseSequence' column.
	 */
	protected String iReversesequence = null;


	/**
	 * This variable represents the contents for the 'rank2Sequence' column.
	 */
	protected String iRank2sequence = null;


	/**
	 * This variable represents the contents for the 'parent_m_over_z' column.
	 */
	protected Number iParent_m_over_z = null;


	/**
	 * This variable represents the contents for the 'parent_charge' column.
	 */
	protected long iParent_charge = Long.MIN_VALUE;


	/**
	 * This variable represents the contents for the 'matched_parent_mass' column.
	 */
	protected Number iMatched_parent_mass = null;


	/**
	 * This variable represents the contents for the 'delta_parent_mass' column.
	 */
	protected Number iDelta_parent_mass = null;


	/**
	 * This variable represents the contents for the 'retentionTimeConstant' column.
	 */
	protected Number iRetentiontimeconstant = null;


	/**
	 * This variable represents the contents for the 'peptide_pI' column.
	 */
	protected Number iPeptide_pi = null;


	/**
	 * This variable represents the contents for the 'parent_mass_convert' column.
	 */
	protected String iParent_mass_convert = null;


	/**
	 * This variable represents the contents for the 'cys' column.
	 */
	protected String iCys = null;


	/**
	 * This variable represents the contents for the 'nterm' column.
	 */
	protected String iNterm = null;


	/**
	 * This variable represents the contents for the 'cterm' column.
	 */
	protected String iCterm = null;


	/**
	 * This variable represents the contents for the 'tolerance_units' column.
	 */
	protected String iTolerance_units = null;


	/**
	 * This variable represents the contents for the 'parent_mass_tolerance' column.
	 */
	protected Number iParent_mass_tolerance = null;


	/**
	 * This variable represents the contents for the 'fragment_mass_tolerance' column.
	 */
	protected Number iFragment_mass_tolerance = null;


	/**
	 * This variable represents the contents for the 'search_type' column.
	 */
	protected String iSearch_type = null;


	/**
	 * This variable represents the contents for the 'num_seqs_past_parent_filter' column.
	 */
	protected long iNum_seqs_past_parent_filter = Long.MIN_VALUE;


	/**
	 * This variable represents the contents for the 'mutation_matrix_off' column.
	 */
	protected long iMutation_matrix_off = Long.MIN_VALUE;


	/**
	 * This variable represents the contents for the 'star_ions_off' column.
	 */
	protected long iStar_ions_off = Long.MIN_VALUE;


	/**
	 * This variable represents the contents for the 'parent_shift_type' column.
	 */
	protected String iParent_shift_type = null;


	/**
	 * This variable represents the contents for the 'parent_shift' column.
	 */
	protected Number iParent_shift = null;


	/**
	 * This variable represents the contents for the 'creationdate' column.
	 */
	protected java.sql.Timestamp iCreationdate = null;


	/**
	 * This variable represents the contents for the 'modificationdate' column.
	 */
	protected java.sql.Timestamp iModificationdate = null;


	/**
	 * This variable represents the contents for the 'username' column.
	 */
	protected String iUsername = null;


	/**
	 * This variable represents the key for the 'peptideid' column.
	 */
	public static final String PEPTIDEID = "PEPTIDEID";

	/**
	 * This variable represents the key for the 'l_spectrumid' column.
	 */
	public static final String L_SPECTRUMID = "L_SPECTRUMID";

	/**
	 * This variable represents the key for the 'sequence' column.
	 */
	public static final String SEQUENCE = "SEQUENCE";

	/**
	 * This variable represents the key for the 'modified_sequence' column.
	 */
	public static final String MODIFIED_SEQUENCE = "MODIFIED_SEQUENCE";

	/**
	 * This variable represents the key for the 'score' column.
	 */
	public static final String SCORE = "SCORE";

	/**
	 * This variable represents the key for the 'percent_scored_peak_intensity' column.
	 */
	public static final String PERCENT_SCORED_PEAK_INTENSITY = "PERCENT_SCORED_PEAK_INTENSITY";

	/**
	 * This variable represents the key for the 'backbone_cleavage_score' column.
	 */
	public static final String BACKBONE_CLEAVAGE_SCORE = "BACKBONE_CLEAVAGE_SCORE";

	/**
	 * This variable represents the key for the 'num_unused_ions' column.
	 */
	public static final String NUM_UNUSED_IONS = "NUM_UNUSED_IONS";

	/**
	 * This variable represents the key for the 'num_fragment_ions' column.
	 */
	public static final String NUM_FRAGMENT_IONS = "NUM_FRAGMENT_IONS";

	/**
	 * This variable represents the key for the 'reverseScore' column.
	 */
	public static final String REVERSESCORE = "REVERSESCORE";

	/**
	 * This variable represents the key for the 'reverse_percent_scored_peak_intensity' column.
	 */
	public static final String REVERSE_PERCENT_SCORED_PEAK_INTENSITY = "REVERSE_PERCENT_SCORED_PEAK_INTENSITY";

	/**
	 * This variable represents the key for the 'deltaForwardReverseScore' column.
	 */
	public static final String DELTAFORWARDREVERSESCORE = "DELTAFORWARDREVERSESCORE";

	/**
	 * This variable represents the key for the 'rank2Score' column.
	 */
	public static final String RANK2SCORE = "RANK2SCORE";

	/**
	 * This variable represents the key for the 'rank2_percent_scored_peak_intensity' column.
	 */
	public static final String RANK2_PERCENT_SCORED_PEAK_INTENSITY = "RANK2_PERCENT_SCORED_PEAK_INTENSITY";

	/**
	 * This variable represents the key for the 'deltaRank1Rank2Score' column.
	 */
	public static final String DELTARANK1RANK2SCORE = "DELTARANK1RANK2SCORE";

	/**
	 * This variable represents the key for the 'previous_aa' column.
	 */
	public static final String PREVIOUS_AA = "PREVIOUS_AA";

	/**
	 * This variable represents the key for the 'next_aa' column.
	 */
	public static final String NEXT_AA = "NEXT_AA";

	/**
	 * This variable represents the key for the 'fragmentIonMap' column.
	 */
	public static final String FRAGMENTIONMAP = "FRAGMENTIONMAP";

	/**
	 * This variable represents the key for the 'reverseSequence' column.
	 */
	public static final String REVERSESEQUENCE = "REVERSESEQUENCE";

	/**
	 * This variable represents the key for the 'rank2Sequence' column.
	 */
	public static final String RANK2SEQUENCE = "RANK2SEQUENCE";

	/**
	 * This variable represents the key for the 'parent_m_over_z' column.
	 */
	public static final String PARENT_M_OVER_Z = "PARENT_M_OVER_Z";

	/**
	 * This variable represents the key for the 'parent_charge' column.
	 */
	public static final String PARENT_CHARGE = "PARENT_CHARGE";

	/**
	 * This variable represents the key for the 'matched_parent_mass' column.
	 */
	public static final String MATCHED_PARENT_MASS = "MATCHED_PARENT_MASS";

	/**
	 * This variable represents the key for the 'delta_parent_mass' column.
	 */
	public static final String DELTA_PARENT_MASS = "DELTA_PARENT_MASS";

	/**
	 * This variable represents the key for the 'retentionTimeConstant' column.
	 */
	public static final String RETENTIONTIMECONSTANT = "RETENTIONTIMECONSTANT";

	/**
	 * This variable represents the key for the 'peptide_pI' column.
	 */
	public static final String PEPTIDE_PI = "PEPTIDE_PI";

	/**
	 * This variable represents the key for the 'parent_mass_convert' column.
	 */
	public static final String PARENT_MASS_CONVERT = "PARENT_MASS_CONVERT";

	/**
	 * This variable represents the key for the 'cys' column.
	 */
	public static final String CYS = "CYS";

	/**
	 * This variable represents the key for the 'nterm' column.
	 */
	public static final String NTERM = "NTERM";

	/**
	 * This variable represents the key for the 'cterm' column.
	 */
	public static final String CTERM = "CTERM";

	/**
	 * This variable represents the key for the 'tolerance_units' column.
	 */
	public static final String TOLERANCE_UNITS = "TOLERANCE_UNITS";

	/**
	 * This variable represents the key for the 'parent_mass_tolerance' column.
	 */
	public static final String PARENT_MASS_TOLERANCE = "PARENT_MASS_TOLERANCE";

	/**
	 * This variable represents the key for the 'fragment_mass_tolerance' column.
	 */
	public static final String FRAGMENT_MASS_TOLERANCE = "FRAGMENT_MASS_TOLERANCE";

	/**
	 * This variable represents the key for the 'search_type' column.
	 */
	public static final String SEARCH_TYPE = "SEARCH_TYPE";

	/**
	 * This variable represents the key for the 'num_seqs_past_parent_filter' column.
	 */
	public static final String NUM_SEQS_PAST_PARENT_FILTER = "NUM_SEQS_PAST_PARENT_FILTER";

	/**
	 * This variable represents the key for the 'mutation_matrix_off' column.
	 */
	public static final String MUTATION_MATRIX_OFF = "MUTATION_MATRIX_OFF";

	/**
	 * This variable represents the key for the 'star_ions_off' column.
	 */
	public static final String STAR_IONS_OFF = "STAR_IONS_OFF";

	/**
	 * This variable represents the key for the 'parent_shift_type' column.
	 */
	public static final String PARENT_SHIFT_TYPE = "PARENT_SHIFT_TYPE";

	/**
	 * This variable represents the key for the 'parent_shift' column.
	 */
	public static final String PARENT_SHIFT = "PARENT_SHIFT";

	/**
	 * This variable represents the key for the 'creationdate' column.
	 */
	public static final String CREATIONDATE = "CREATIONDATE";

	/**
	 * This variable represents the key for the 'modificationdate' column.
	 */
	public static final String MODIFICATIONDATE = "MODIFICATIONDATE";

	/**
	 * This variable represents the key for the 'username' column.
	 */
	public static final String USERNAME = "USERNAME";




	/**
	 * Default constructor.
	 */
	public PeptideTableAccessor() {
	}

	/**
	 * This constructor allows the creation of the 'PeptideTableAccessor' object based on a set of values in the HashMap.
	 *
	 * @param	aParams	HashMap with the parameters to initialize this object with.
	 *		<i>Please use only constants defined on this class as keys in the HashMap!</i>
	 */
	public PeptideTableAccessor(HashMap aParams) {
		if(aParams.containsKey(PEPTIDEID)) {
			this.iPeptideid = ((Long)aParams.get(PEPTIDEID)).longValue();
		}
		if(aParams.containsKey(L_SPECTRUMID)) {
			this.iL_spectrumid = ((Long)aParams.get(L_SPECTRUMID)).longValue();
		}
		if(aParams.containsKey(SEQUENCE)) {
			this.iSequence = (String)aParams.get(SEQUENCE);
		}
		if(aParams.containsKey(MODIFIED_SEQUENCE)) {
			this.iModified_sequence = (String)aParams.get(MODIFIED_SEQUENCE);
		}
		if(aParams.containsKey(SCORE)) {
			this.iScore = (Number)aParams.get(SCORE);
		}
		if(aParams.containsKey(PERCENT_SCORED_PEAK_INTENSITY)) {
			this.iPercent_scored_peak_intensity = (Number)aParams.get(PERCENT_SCORED_PEAK_INTENSITY);
		}
		if(aParams.containsKey(BACKBONE_CLEAVAGE_SCORE)) {
			this.iBackbone_cleavage_score = ((Long)aParams.get(BACKBONE_CLEAVAGE_SCORE)).longValue();
		}
		if(aParams.containsKey(NUM_UNUSED_IONS)) {
			this.iNum_unused_ions = ((Long)aParams.get(NUM_UNUSED_IONS)).longValue();
		}
		if(aParams.containsKey(NUM_FRAGMENT_IONS)) {
			this.iNum_fragment_ions = ((Long)aParams.get(NUM_FRAGMENT_IONS)).longValue();
		}
		if(aParams.containsKey(REVERSESCORE)) {
			this.iReversescore = (Number)aParams.get(REVERSESCORE);
		}
		if(aParams.containsKey(REVERSE_PERCENT_SCORED_PEAK_INTENSITY)) {
			this.iReverse_percent_scored_peak_intensity = (Number)aParams.get(REVERSE_PERCENT_SCORED_PEAK_INTENSITY);
		}
		if(aParams.containsKey(DELTAFORWARDREVERSESCORE)) {
			this.iDeltaforwardreversescore = (Number)aParams.get(DELTAFORWARDREVERSESCORE);
		}
		if(aParams.containsKey(RANK2SCORE)) {
			this.iRank2score = (Number)aParams.get(RANK2SCORE);
		}
		if(aParams.containsKey(RANK2_PERCENT_SCORED_PEAK_INTENSITY)) {
			this.iRank2_percent_scored_peak_intensity = (Number)aParams.get(RANK2_PERCENT_SCORED_PEAK_INTENSITY);
		}
		if(aParams.containsKey(DELTARANK1RANK2SCORE)) {
			this.iDeltarank1rank2score = (Number)aParams.get(DELTARANK1RANK2SCORE);
		}
		if(aParams.containsKey(PREVIOUS_AA)) {
			this.iPrevious_aa = (String)aParams.get(PREVIOUS_AA);
		}
		if(aParams.containsKey(NEXT_AA)) {
			this.iNext_aa = (String)aParams.get(NEXT_AA);
		}
		if(aParams.containsKey(FRAGMENTIONMAP)) {
			this.iFragmentionmap = (String)aParams.get(FRAGMENTIONMAP);
		}
		if(aParams.containsKey(REVERSESEQUENCE)) {
			this.iReversesequence = (String)aParams.get(REVERSESEQUENCE);
		}
		if(aParams.containsKey(RANK2SEQUENCE)) {
			this.iRank2sequence = (String)aParams.get(RANK2SEQUENCE);
		}
		if(aParams.containsKey(PARENT_M_OVER_Z)) {
			this.iParent_m_over_z = (Number)aParams.get(PARENT_M_OVER_Z);
		}
		if(aParams.containsKey(PARENT_CHARGE)) {
			this.iParent_charge = ((Long)aParams.get(PARENT_CHARGE)).longValue();
		}
		if(aParams.containsKey(MATCHED_PARENT_MASS)) {
			this.iMatched_parent_mass = (Number)aParams.get(MATCHED_PARENT_MASS);
		}
		if(aParams.containsKey(DELTA_PARENT_MASS)) {
			this.iDelta_parent_mass = (Number)aParams.get(DELTA_PARENT_MASS);
		}
		if(aParams.containsKey(RETENTIONTIMECONSTANT)) {
			this.iRetentiontimeconstant = (Number)aParams.get(RETENTIONTIMECONSTANT);
		}
		if(aParams.containsKey(PEPTIDE_PI)) {
			this.iPeptide_pi = (Number)aParams.get(PEPTIDE_PI);
		}
		if(aParams.containsKey(PARENT_MASS_CONVERT)) {
			this.iParent_mass_convert = (String)aParams.get(PARENT_MASS_CONVERT);
		}
		if(aParams.containsKey(CYS)) {
			this.iCys = (String)aParams.get(CYS);
		}
		if(aParams.containsKey(NTERM)) {
			this.iNterm = (String)aParams.get(NTERM);
		}
		if(aParams.containsKey(CTERM)) {
			this.iCterm = (String)aParams.get(CTERM);
		}
		if(aParams.containsKey(TOLERANCE_UNITS)) {
			this.iTolerance_units = (String)aParams.get(TOLERANCE_UNITS);
		}
		if(aParams.containsKey(PARENT_MASS_TOLERANCE)) {
			this.iParent_mass_tolerance = (Number)aParams.get(PARENT_MASS_TOLERANCE);
		}
		if(aParams.containsKey(FRAGMENT_MASS_TOLERANCE)) {
			this.iFragment_mass_tolerance = (Number)aParams.get(FRAGMENT_MASS_TOLERANCE);
		}
		if(aParams.containsKey(SEARCH_TYPE)) {
			this.iSearch_type = (String)aParams.get(SEARCH_TYPE);
		}
		if(aParams.containsKey(NUM_SEQS_PAST_PARENT_FILTER)) {
			this.iNum_seqs_past_parent_filter = ((Long)aParams.get(NUM_SEQS_PAST_PARENT_FILTER)).longValue();
		}
		if(aParams.containsKey(MUTATION_MATRIX_OFF)) {
			this.iMutation_matrix_off = ((Long)aParams.get(MUTATION_MATRIX_OFF)).longValue();
		}
		if(aParams.containsKey(STAR_IONS_OFF)) {
			this.iStar_ions_off = ((Long)aParams.get(STAR_IONS_OFF)).longValue();
		}
		if(aParams.containsKey(PARENT_SHIFT_TYPE)) {
			this.iParent_shift_type = (String)aParams.get(PARENT_SHIFT_TYPE);
		}
		if(aParams.containsKey(PARENT_SHIFT)) {
			this.iParent_shift = (Number)aParams.get(PARENT_SHIFT);
		}
		if(aParams.containsKey(CREATIONDATE)) {
			this.iCreationdate = (java.sql.Timestamp)aParams.get(CREATIONDATE);
		}
		if(aParams.containsKey(MODIFICATIONDATE)) {
			this.iModificationdate = (java.sql.Timestamp)aParams.get(MODIFICATIONDATE);
		}
		if(aParams.containsKey(USERNAME)) {
			this.iUsername = (String)aParams.get(USERNAME);
		}
		this.iUpdated = true;
	}


	/**
	 * This constructor allows the creation of the 'PeptideTableAccessor' object based on a resultset
	 * obtained by a 'select * from Peptide' query.
	 *
	 * @param	aResultSet	ResultSet with the required columns to initialize this object with.
	 * @exception	SQLException	when the ResultSet could not be read.
	 */
	public PeptideTableAccessor(ResultSet aResultSet) throws SQLException {
		this.iPeptideid = aResultSet.getLong("peptideid");
		this.iL_spectrumid = aResultSet.getLong("l_spectrumid");
		this.iSequence = (String)aResultSet.getObject("sequence");
		this.iModified_sequence = (String)aResultSet.getObject("modified_sequence");
		this.iScore = (Number)aResultSet.getObject("score");
		this.iPercent_scored_peak_intensity = (Number)aResultSet.getObject("percent_scored_peak_intensity");
		this.iBackbone_cleavage_score = aResultSet.getLong("backbone_cleavage_score");
		this.iNum_unused_ions = aResultSet.getLong("num_unused_ions");
		this.iNum_fragment_ions = aResultSet.getLong("num_fragment_ions");
		this.iReversescore = (Number)aResultSet.getObject("reverseScore");
		this.iReverse_percent_scored_peak_intensity = (Number)aResultSet.getObject("reverse_percent_scored_peak_intensity");
		this.iDeltaforwardreversescore = (Number)aResultSet.getObject("deltaForwardReverseScore");
		this.iRank2score = (Number)aResultSet.getObject("rank2Score");
		this.iRank2_percent_scored_peak_intensity = (Number)aResultSet.getObject("rank2_percent_scored_peak_intensity");
		this.iDeltarank1rank2score = (Number)aResultSet.getObject("deltaRank1Rank2Score");
		this.iPrevious_aa = (String)aResultSet.getObject("previous_aa");
		this.iNext_aa = (String)aResultSet.getObject("next_aa");
		this.iFragmentionmap = (String)aResultSet.getObject("fragmentIonMap");
		this.iReversesequence = (String)aResultSet.getObject("reverseSequence");
		this.iRank2sequence = (String)aResultSet.getObject("rank2Sequence");
		this.iParent_m_over_z = (Number)aResultSet.getObject("parent_m_over_z");
		this.iParent_charge = aResultSet.getLong("parent_charge");
		this.iMatched_parent_mass = (Number)aResultSet.getObject("matched_parent_mass");
		this.iDelta_parent_mass = (Number)aResultSet.getObject("delta_parent_mass");
		this.iRetentiontimeconstant = (Number)aResultSet.getObject("retentionTimeConstant");
		this.iPeptide_pi = (Number)aResultSet.getObject("peptide_pI");
		this.iParent_mass_convert = (String)aResultSet.getObject("parent_mass_convert");
		this.iCys = (String)aResultSet.getObject("cys");
		this.iNterm = (String)aResultSet.getObject("nterm");
		this.iCterm = (String)aResultSet.getObject("cterm");
		this.iTolerance_units = (String)aResultSet.getObject("tolerance_units");
		this.iParent_mass_tolerance = (Number)aResultSet.getObject("parent_mass_tolerance");
		this.iFragment_mass_tolerance = (Number)aResultSet.getObject("fragment_mass_tolerance");
		this.iSearch_type = (String)aResultSet.getObject("search_type");
		this.iNum_seqs_past_parent_filter = aResultSet.getLong("num_seqs_past_parent_filter");
		this.iMutation_matrix_off = aResultSet.getLong("mutation_matrix_off");
		this.iStar_ions_off = aResultSet.getLong("star_ions_off");
		this.iParent_shift_type = (String)aResultSet.getObject("parent_shift_type");
		this.iParent_shift = (Number)aResultSet.getObject("parent_shift");
		this.iCreationdate = (java.sql.Timestamp)aResultSet.getObject("creationdate");
		this.iModificationdate = (java.sql.Timestamp)aResultSet.getObject("modificationdate");
		this.iUsername = (String)aResultSet.getObject("username");

		this.iUpdated = true;
	}


	/**
	 * This method returns the value for the 'Peptideid' column
	 * 
	 * @return	long	with the value for the Peptideid column.
	 */
	public long getPeptideid() {
		return this.iPeptideid;
	}

	/**
	 * This method returns the value for the 'L_spectrumid' column
	 * 
	 * @return	long	with the value for the L_spectrumid column.
	 */
	public long getL_spectrumid() {
		return this.iL_spectrumid;
	}

	/**
	 * This method returns the value for the 'Sequence' column
	 * 
	 * @return	String	with the value for the Sequence column.
	 */
	public String getSequence() {
		return this.iSequence;
	}

	/**
	 * This method returns the value for the 'Modified_sequence' column
	 * 
	 * @return	String	with the value for the Modified_sequence column.
	 */
	public String getModified_sequence() {
		return this.iModified_sequence;
	}

	/**
	 * This method returns the value for the 'Score' column
	 * 
	 * @return	Number	with the value for the Score column.
	 */
	public Number getScore() {
		return this.iScore;
	}

	/**
	 * This method returns the value for the 'Percent_scored_peak_intensity' column
	 * 
	 * @return	Number	with the value for the Percent_scored_peak_intensity column.
	 */
	public Number getPercent_scored_peak_intensity() {
		return this.iPercent_scored_peak_intensity;
	}

	/**
	 * This method returns the value for the 'Backbone_cleavage_score' column
	 * 
	 * @return	long	with the value for the Backbone_cleavage_score column.
	 */
	public long getBackbone_cleavage_score() {
		return this.iBackbone_cleavage_score;
	}

	/**
	 * This method returns the value for the 'Num_unused_ions' column
	 * 
	 * @return	long	with the value for the Num_unused_ions column.
	 */
	public long getNum_unused_ions() {
		return this.iNum_unused_ions;
	}

	/**
	 * This method returns the value for the 'Num_fragment_ions' column
	 * 
	 * @return	long	with the value for the Num_fragment_ions column.
	 */
	public long getNum_fragment_ions() {
		return this.iNum_fragment_ions;
	}

	/**
	 * This method returns the value for the 'Reversescore' column
	 * 
	 * @return	Number	with the value for the Reversescore column.
	 */
	public Number getReversescore() {
		return this.iReversescore;
	}

	/**
	 * This method returns the value for the 'Reverse_percent_scored_peak_intensity' column
	 * 
	 * @return	Number	with the value for the Reverse_percent_scored_peak_intensity column.
	 */
	public Number getReverse_percent_scored_peak_intensity() {
		return this.iReverse_percent_scored_peak_intensity;
	}

	/**
	 * This method returns the value for the 'Deltaforwardreversescore' column
	 * 
	 * @return	Number	with the value for the Deltaforwardreversescore column.
	 */
	public Number getDeltaforwardreversescore() {
		return this.iDeltaforwardreversescore;
	}

	/**
	 * This method returns the value for the 'Rank2score' column
	 * 
	 * @return	Number	with the value for the Rank2score column.
	 */
	public Number getRank2score() {
		return this.iRank2score;
	}

	/**
	 * This method returns the value for the 'Rank2_percent_scored_peak_intensity' column
	 * 
	 * @return	Number	with the value for the Rank2_percent_scored_peak_intensity column.
	 */
	public Number getRank2_percent_scored_peak_intensity() {
		return this.iRank2_percent_scored_peak_intensity;
	}

	/**
	 * This method returns the value for the 'Deltarank1rank2score' column
	 * 
	 * @return	Number	with the value for the Deltarank1rank2score column.
	 */
	public Number getDeltarank1rank2score() {
		return this.iDeltarank1rank2score;
	}

	/**
	 * This method returns the value for the 'Previous_aa' column
	 * 
	 * @return	String	with the value for the Previous_aa column.
	 */
	public String getPrevious_aa() {
		return this.iPrevious_aa;
	}

	/**
	 * This method returns the value for the 'Next_aa' column
	 * 
	 * @return	String	with the value for the Next_aa column.
	 */
	public String getNext_aa() {
		return this.iNext_aa;
	}

	/**
	 * This method returns the value for the 'Fragmentionmap' column
	 * 
	 * @return	String	with the value for the Fragmentionmap column.
	 */
	public String getFragmentionmap() {
		return this.iFragmentionmap;
	}

	/**
	 * This method returns the value for the 'Reversesequence' column
	 * 
	 * @return	String	with the value for the Reversesequence column.
	 */
	public String getReversesequence() {
		return this.iReversesequence;
	}

	/**
	 * This method returns the value for the 'Rank2sequence' column
	 * 
	 * @return	String	with the value for the Rank2sequence column.
	 */
	public String getRank2sequence() {
		return this.iRank2sequence;
	}

	/**
	 * This method returns the value for the 'Parent_m_over_z' column
	 * 
	 * @return	Number	with the value for the Parent_m_over_z column.
	 */
	public Number getParent_m_over_z() {
		return this.iParent_m_over_z;
	}

	/**
	 * This method returns the value for the 'Parent_charge' column
	 * 
	 * @return	long	with the value for the Parent_charge column.
	 */
	public long getParent_charge() {
		return this.iParent_charge;
	}

	/**
	 * This method returns the value for the 'Matched_parent_mass' column
	 * 
	 * @return	Number	with the value for the Matched_parent_mass column.
	 */
	public Number getMatched_parent_mass() {
		return this.iMatched_parent_mass;
	}

	/**
	 * This method returns the value for the 'Delta_parent_mass' column
	 * 
	 * @return	Number	with the value for the Delta_parent_mass column.
	 */
	public Number getDelta_parent_mass() {
		return this.iDelta_parent_mass;
	}

	/**
	 * This method returns the value for the 'Retentiontimeconstant' column
	 * 
	 * @return	Number	with the value for the Retentiontimeconstant column.
	 */
	public Number getRetentiontimeconstant() {
		return this.iRetentiontimeconstant;
	}

	/**
	 * This method returns the value for the 'Peptide_pi' column
	 * 
	 * @return	Number	with the value for the Peptide_pi column.
	 */
	public Number getPeptide_pi() {
		return this.iPeptide_pi;
	}

	/**
	 * This method returns the value for the 'Parent_mass_convert' column
	 * 
	 * @return	String	with the value for the Parent_mass_convert column.
	 */
	public String getParent_mass_convert() {
		return this.iParent_mass_convert;
	}

	/**
	 * This method returns the value for the 'Cys' column
	 * 
	 * @return	String	with the value for the Cys column.
	 */
	public String getCys() {
		return this.iCys;
	}

	/**
	 * This method returns the value for the 'Nterm' column
	 * 
	 * @return	String	with the value for the Nterm column.
	 */
	public String getNterm() {
		return this.iNterm;
	}

	/**
	 * This method returns the value for the 'Cterm' column
	 * 
	 * @return	String	with the value for the Cterm column.
	 */
	public String getCterm() {
		return this.iCterm;
	}

	/**
	 * This method returns the value for the 'Tolerance_units' column
	 * 
	 * @return	String	with the value for the Tolerance_units column.
	 */
	public String getTolerance_units() {
		return this.iTolerance_units;
	}

	/**
	 * This method returns the value for the 'Parent_mass_tolerance' column
	 * 
	 * @return	Number	with the value for the Parent_mass_tolerance column.
	 */
	public Number getParent_mass_tolerance() {
		return this.iParent_mass_tolerance;
	}

	/**
	 * This method returns the value for the 'Fragment_mass_tolerance' column
	 * 
	 * @return	Number	with the value for the Fragment_mass_tolerance column.
	 */
	public Number getFragment_mass_tolerance() {
		return this.iFragment_mass_tolerance;
	}

	/**
	 * This method returns the value for the 'Search_type' column
	 * 
	 * @return	String	with the value for the Search_type column.
	 */
	public String getSearch_type() {
		return this.iSearch_type;
	}

	/**
	 * This method returns the value for the 'Num_seqs_past_parent_filter' column
	 * 
	 * @return	long	with the value for the Num_seqs_past_parent_filter column.
	 */
	public long getNum_seqs_past_parent_filter() {
		return this.iNum_seqs_past_parent_filter;
	}

	/**
	 * This method returns the value for the 'Mutation_matrix_off' column
	 * 
	 * @return	long	with the value for the Mutation_matrix_off column.
	 */
	public long getMutation_matrix_off() {
		return this.iMutation_matrix_off;
	}

	/**
	 * This method returns the value for the 'Star_ions_off' column
	 * 
	 * @return	long	with the value for the Star_ions_off column.
	 */
	public long getStar_ions_off() {
		return this.iStar_ions_off;
	}

	/**
	 * This method returns the value for the 'Parent_shift_type' column
	 * 
	 * @return	String	with the value for the Parent_shift_type column.
	 */
	public String getParent_shift_type() {
		return this.iParent_shift_type;
	}

	/**
	 * This method returns the value for the 'Parent_shift' column
	 * 
	 * @return	Number	with the value for the Parent_shift column.
	 */
	public Number getParent_shift() {
		return this.iParent_shift;
	}

	/**
	 * This method returns the value for the 'Creationdate' column
	 * 
	 * @return	java.sql.Timestamp	with the value for the Creationdate column.
	 */
	public java.sql.Timestamp getCreationdate() {
		return this.iCreationdate;
	}

	/**
	 * This method returns the value for the 'Modificationdate' column
	 * 
	 * @return	java.sql.Timestamp	with the value for the Modificationdate column.
	 */
	public java.sql.Timestamp getModificationdate() {
		return this.iModificationdate;
	}

	/**
	 * This method returns the value for the 'Username' column
	 * 
	 * @return	String	with the value for the Username column.
	 */
	public String getUsername() {
		return this.iUsername;
	}

	/**
	 * This method sets the value for the 'Peptideid' column
	 * 
	 * @param	aPeptideid	long with the value for the Peptideid column.
	 */
	public void setPeptideid(long aPeptideid) {
		this.iPeptideid = aPeptideid;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'L_spectrumid' column
	 * 
	 * @param	aL_spectrumid	long with the value for the L_spectrumid column.
	 */
	public void setL_spectrumid(long aL_spectrumid) {
		this.iL_spectrumid = aL_spectrumid;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Sequence' column
	 * 
	 * @param	aSequence	String with the value for the Sequence column.
	 */
	public void setSequence(String aSequence) {
		this.iSequence = aSequence;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Modified_sequence' column
	 * 
	 * @param	aModified_sequence	String with the value for the Modified_sequence column.
	 */
	public void setModified_sequence(String aModified_sequence) {
		this.iModified_sequence = aModified_sequence;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Score' column
	 * 
	 * @param	aScore	Number with the value for the Score column.
	 */
	public void setScore(Number aScore) {
		this.iScore = aScore;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Percent_scored_peak_intensity' column
	 * 
	 * @param	aPercent_scored_peak_intensity	Number with the value for the Percent_scored_peak_intensity column.
	 */
	public void setPercent_scored_peak_intensity(Number aPercent_scored_peak_intensity) {
		this.iPercent_scored_peak_intensity = aPercent_scored_peak_intensity;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Backbone_cleavage_score' column
	 * 
	 * @param	aBackbone_cleavage_score	long with the value for the Backbone_cleavage_score column.
	 */
	public void setBackbone_cleavage_score(long aBackbone_cleavage_score) {
		this.iBackbone_cleavage_score = aBackbone_cleavage_score;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Num_unused_ions' column
	 * 
	 * @param	aNum_unused_ions	long with the value for the Num_unused_ions column.
	 */
	public void setNum_unused_ions(long aNum_unused_ions) {
		this.iNum_unused_ions = aNum_unused_ions;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Num_fragment_ions' column
	 * 
	 * @param	aNum_fragment_ions	long with the value for the Num_fragment_ions column.
	 */
	public void setNum_fragment_ions(long aNum_fragment_ions) {
		this.iNum_fragment_ions = aNum_fragment_ions;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Reversescore' column
	 * 
	 * @param	aReversescore	Number with the value for the Reversescore column.
	 */
	public void setReversescore(Number aReversescore) {
		this.iReversescore = aReversescore;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Reverse_percent_scored_peak_intensity' column
	 * 
	 * @param	aReverse_percent_scored_peak_intensity	Number with the value for the Reverse_percent_scored_peak_intensity column.
	 */
	public void setReverse_percent_scored_peak_intensity(Number aReverse_percent_scored_peak_intensity) {
		this.iReverse_percent_scored_peak_intensity = aReverse_percent_scored_peak_intensity;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Deltaforwardreversescore' column
	 * 
	 * @param	aDeltaforwardreversescore	Number with the value for the Deltaforwardreversescore column.
	 */
	public void setDeltaforwardreversescore(Number aDeltaforwardreversescore) {
		this.iDeltaforwardreversescore = aDeltaforwardreversescore;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Rank2score' column
	 * 
	 * @param	aRank2score	Number with the value for the Rank2score column.
	 */
	public void setRank2score(Number aRank2score) {
		this.iRank2score = aRank2score;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Rank2_percent_scored_peak_intensity' column
	 * 
	 * @param	aRank2_percent_scored_peak_intensity	Number with the value for the Rank2_percent_scored_peak_intensity column.
	 */
	public void setRank2_percent_scored_peak_intensity(Number aRank2_percent_scored_peak_intensity) {
		this.iRank2_percent_scored_peak_intensity = aRank2_percent_scored_peak_intensity;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Deltarank1rank2score' column
	 * 
	 * @param	aDeltarank1rank2score	Number with the value for the Deltarank1rank2score column.
	 */
	public void setDeltarank1rank2score(Number aDeltarank1rank2score) {
		this.iDeltarank1rank2score = aDeltarank1rank2score;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Previous_aa' column
	 * 
	 * @param	aPrevious_aa	String with the value for the Previous_aa column.
	 */
	public void setPrevious_aa(String aPrevious_aa) {
		this.iPrevious_aa = aPrevious_aa;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Next_aa' column
	 * 
	 * @param	aNext_aa	String with the value for the Next_aa column.
	 */
	public void setNext_aa(String aNext_aa) {
		this.iNext_aa = aNext_aa;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Fragmentionmap' column
	 * 
	 * @param	aFragmentionmap	String with the value for the Fragmentionmap column.
	 */
	public void setFragmentionmap(String aFragmentionmap) {
		this.iFragmentionmap = aFragmentionmap;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Reversesequence' column
	 * 
	 * @param	aReversesequence	String with the value for the Reversesequence column.
	 */
	public void setReversesequence(String aReversesequence) {
		this.iReversesequence = aReversesequence;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Rank2sequence' column
	 * 
	 * @param	aRank2sequence	String with the value for the Rank2sequence column.
	 */
	public void setRank2sequence(String aRank2sequence) {
		this.iRank2sequence = aRank2sequence;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Parent_m_over_z' column
	 * 
	 * @param	aParent_m_over_z	Number with the value for the Parent_m_over_z column.
	 */
	public void setParent_m_over_z(Number aParent_m_over_z) {
		this.iParent_m_over_z = aParent_m_over_z;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Parent_charge' column
	 * 
	 * @param	aParent_charge	long with the value for the Parent_charge column.
	 */
	public void setParent_charge(long aParent_charge) {
		this.iParent_charge = aParent_charge;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Matched_parent_mass' column
	 * 
	 * @param	aMatched_parent_mass	Number with the value for the Matched_parent_mass column.
	 */
	public void setMatched_parent_mass(Number aMatched_parent_mass) {
		this.iMatched_parent_mass = aMatched_parent_mass;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Delta_parent_mass' column
	 * 
	 * @param	aDelta_parent_mass	Number with the value for the Delta_parent_mass column.
	 */
	public void setDelta_parent_mass(Number aDelta_parent_mass) {
		this.iDelta_parent_mass = aDelta_parent_mass;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Retentiontimeconstant' column
	 * 
	 * @param	aRetentiontimeconstant	Number with the value for the Retentiontimeconstant column.
	 */
	public void setRetentiontimeconstant(Number aRetentiontimeconstant) {
		this.iRetentiontimeconstant = aRetentiontimeconstant;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Peptide_pi' column
	 * 
	 * @param	aPeptide_pi	Number with the value for the Peptide_pi column.
	 */
	public void setPeptide_pi(Number aPeptide_pi) {
		this.iPeptide_pi = aPeptide_pi;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Parent_mass_convert' column
	 * 
	 * @param	aParent_mass_convert	String with the value for the Parent_mass_convert column.
	 */
	public void setParent_mass_convert(String aParent_mass_convert) {
		this.iParent_mass_convert = aParent_mass_convert;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Cys' column
	 * 
	 * @param	aCys	String with the value for the Cys column.
	 */
	public void setCys(String aCys) {
		this.iCys = aCys;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Nterm' column
	 * 
	 * @param	aNterm	String with the value for the Nterm column.
	 */
	public void setNterm(String aNterm) {
		this.iNterm = aNterm;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Cterm' column
	 * 
	 * @param	aCterm	String with the value for the Cterm column.
	 */
	public void setCterm(String aCterm) {
		this.iCterm = aCterm;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Tolerance_units' column
	 * 
	 * @param	aTolerance_units	String with the value for the Tolerance_units column.
	 */
	public void setTolerance_units(String aTolerance_units) {
		this.iTolerance_units = aTolerance_units;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Parent_mass_tolerance' column
	 * 
	 * @param	aParent_mass_tolerance	Number with the value for the Parent_mass_tolerance column.
	 */
	public void setParent_mass_tolerance(Number aParent_mass_tolerance) {
		this.iParent_mass_tolerance = aParent_mass_tolerance;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Fragment_mass_tolerance' column
	 * 
	 * @param	aFragment_mass_tolerance	Number with the value for the Fragment_mass_tolerance column.
	 */
	public void setFragment_mass_tolerance(Number aFragment_mass_tolerance) {
		this.iFragment_mass_tolerance = aFragment_mass_tolerance;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Search_type' column
	 * 
	 * @param	aSearch_type	String with the value for the Search_type column.
	 */
	public void setSearch_type(String aSearch_type) {
		this.iSearch_type = aSearch_type;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Num_seqs_past_parent_filter' column
	 * 
	 * @param	aNum_seqs_past_parent_filter	long with the value for the Num_seqs_past_parent_filter column.
	 */
	public void setNum_seqs_past_parent_filter(long aNum_seqs_past_parent_filter) {
		this.iNum_seqs_past_parent_filter = aNum_seqs_past_parent_filter;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Mutation_matrix_off' column
	 * 
	 * @param	aMutation_matrix_off	long with the value for the Mutation_matrix_off column.
	 */
	public void setMutation_matrix_off(long aMutation_matrix_off) {
		this.iMutation_matrix_off = aMutation_matrix_off;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Star_ions_off' column
	 * 
	 * @param	aStar_ions_off	long with the value for the Star_ions_off column.
	 */
	public void setStar_ions_off(long aStar_ions_off) {
		this.iStar_ions_off = aStar_ions_off;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Parent_shift_type' column
	 * 
	 * @param	aParent_shift_type	String with the value for the Parent_shift_type column.
	 */
	public void setParent_shift_type(String aParent_shift_type) {
		this.iParent_shift_type = aParent_shift_type;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Parent_shift' column
	 * 
	 * @param	aParent_shift	Number with the value for the Parent_shift column.
	 */
	public void setParent_shift(Number aParent_shift) {
		this.iParent_shift = aParent_shift;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Creationdate' column
	 * 
	 * @param	aCreationdate	java.sql.Timestamp with the value for the Creationdate column.
	 */
	public void setCreationdate(java.sql.Timestamp aCreationdate) {
		this.iCreationdate = aCreationdate;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Modificationdate' column
	 * 
	 * @param	aModificationdate	java.sql.Timestamp with the value for the Modificationdate column.
	 */
	public void setModificationdate(java.sql.Timestamp aModificationdate) {
		this.iModificationdate = aModificationdate;
		this.iUpdated = true;
	}

	/**
	 * This method sets the value for the 'Username' column
	 * 
	 * @param	aUsername	String with the value for the Username column.
	 */
	public void setUsername(String aUsername) {
		this.iUsername = aUsername;
		this.iUpdated = true;
	}



	/**
	 * This method allows the caller to delete the data represented by this
	 * object in a persistent store.
	 *
	 * @param   aConn Connection to the persitent store.
	 */
	public int delete(Connection aConn) throws SQLException {
		PreparedStatement lStat = aConn.prepareStatement("DELETE FROM peptide WHERE peptideid = ?");
		lStat.setLong(1, iPeptideid);
		int result = lStat.executeUpdate();
		lStat.close();
		return result;
	}


	/**
	 * This method allows the caller to read data for this
	 * object from a persistent store based on the specified keys.
	 *
	 * @param   aConn Connection to the persitent store.
	 */
	public void retrieve(Connection aConn, HashMap aKeys) throws SQLException {
		// First check to see whether all PK fields are present.
		if(!aKeys.containsKey(PEPTIDEID)) {
			throw new IllegalArgumentException("Primary key field 'PEPTIDEID' is missing in HashMap!");
		} else {
			iPeptideid = ((Long)aKeys.get(PEPTIDEID)).longValue()
;		}
		// In getting here, we probably have all we need to continue. So let's...
		PreparedStatement lStat = aConn.prepareStatement("SELECT * FROM peptide WHERE peptideid = ?");
		lStat.setLong(1, iPeptideid);
		ResultSet lRS = lStat.executeQuery();
		int hits = 0;
		while(lRS.next()) {
			hits++;
			iPeptideid = lRS.getLong("peptideid");
			iL_spectrumid = lRS.getLong("l_spectrumid");
			iSequence = (String)lRS.getObject("sequence");
			iModified_sequence = (String)lRS.getObject("modified_sequence");
			iScore = (Number)lRS.getObject("score");
			iPercent_scored_peak_intensity = (Number)lRS.getObject("percent_scored_peak_intensity");
			iBackbone_cleavage_score = lRS.getLong("backbone_cleavage_score");
			iNum_unused_ions = lRS.getLong("num_unused_ions");
			iNum_fragment_ions = lRS.getLong("num_fragment_ions");
			iReversescore = (Number)lRS.getObject("reverseScore");
			iReverse_percent_scored_peak_intensity = (Number)lRS.getObject("reverse_percent_scored_peak_intensity");
			iDeltaforwardreversescore = (Number)lRS.getObject("deltaForwardReverseScore");
			iRank2score = (Number)lRS.getObject("rank2Score");
			iRank2_percent_scored_peak_intensity = (Number)lRS.getObject("rank2_percent_scored_peak_intensity");
			iDeltarank1rank2score = (Number)lRS.getObject("deltaRank1Rank2Score");
			iPrevious_aa = (String)lRS.getObject("previous_aa");
			iNext_aa = (String)lRS.getObject("next_aa");
			iFragmentionmap = (String)lRS.getObject("fragmentIonMap");
			iReversesequence = (String)lRS.getObject("reverseSequence");
			iRank2sequence = (String)lRS.getObject("rank2Sequence");
			iParent_m_over_z = (Number)lRS.getObject("parent_m_over_z");
			iParent_charge = lRS.getLong("parent_charge");
			iMatched_parent_mass = (Number)lRS.getObject("matched_parent_mass");
			iDelta_parent_mass = (Number)lRS.getObject("delta_parent_mass");
			iRetentiontimeconstant = (Number)lRS.getObject("retentionTimeConstant");
			iPeptide_pi = (Number)lRS.getObject("peptide_pI");
			iParent_mass_convert = (String)lRS.getObject("parent_mass_convert");
			iCys = (String)lRS.getObject("cys");
			iNterm = (String)lRS.getObject("nterm");
			iCterm = (String)lRS.getObject("cterm");
			iTolerance_units = (String)lRS.getObject("tolerance_units");
			iParent_mass_tolerance = (Number)lRS.getObject("parent_mass_tolerance");
			iFragment_mass_tolerance = (Number)lRS.getObject("fragment_mass_tolerance");
			iSearch_type = (String)lRS.getObject("search_type");
			iNum_seqs_past_parent_filter = lRS.getLong("num_seqs_past_parent_filter");
			iMutation_matrix_off = lRS.getLong("mutation_matrix_off");
			iStar_ions_off = lRS.getLong("star_ions_off");
			iParent_shift_type = (String)lRS.getObject("parent_shift_type");
			iParent_shift = (Number)lRS.getObject("parent_shift");
			iCreationdate = (java.sql.Timestamp)lRS.getObject("creationdate");
			iModificationdate = (java.sql.Timestamp)lRS.getObject("modificationdate");
			iUsername = (String)lRS.getObject("username");
		}
		lRS.close();
		lStat.close();
		if(hits>1) {
			throw new SQLException("More than one hit found for the specified primary keys in the 'peptide' table! Object is initialized to last row returned.");
		} else if(hits == 0) {
			throw new SQLException("No hits found for the specified primary keys in the 'peptide' table! Object is not initialized correctly!");
		}
	}


	/**
	 * This method allows the caller to update the data represented by this
	 * object in a persistent store.
	 *
	 * @param   aConn Connection to the persitent store.
	 */
	public int update(Connection aConn) throws SQLException {
		if(!this.iUpdated) {
			return 0;
		}
		PreparedStatement lStat = aConn.prepareStatement("UPDATE peptide SET peptideid = ?, l_spectrumid = ?, sequence = ?, modified_sequence = ?, score = ?, percent_scored_peak_intensity = ?, backbone_cleavage_score = ?, num_unused_ions = ?, num_fragment_ions = ?, reverseScore = ?, reverse_percent_scored_peak_intensity = ?, deltaForwardReverseScore = ?, rank2Score = ?, rank2_percent_scored_peak_intensity = ?, deltaRank1Rank2Score = ?, previous_aa = ?, next_aa = ?, fragmentIonMap = ?, reverseSequence = ?, rank2Sequence = ?, parent_m_over_z = ?, parent_charge = ?, matched_parent_mass = ?, delta_parent_mass = ?, retentionTimeConstant = ?, peptide_pI = ?, parent_mass_convert = ?, cys = ?, nterm = ?, cterm = ?, tolerance_units = ?, parent_mass_tolerance = ?, fragment_mass_tolerance = ?, search_type = ?, num_seqs_past_parent_filter = ?, mutation_matrix_off = ?, star_ions_off = ?, parent_shift_type = ?, parent_shift = ?, creationdate = ?, modificationdate = CURRENT_TIMESTAMP, username = ? WHERE peptideid = ?");
		lStat.setLong(1, iPeptideid);
		lStat.setLong(2, iL_spectrumid);
		lStat.setObject(3, iSequence);
		lStat.setObject(4, iModified_sequence);
		lStat.setObject(5, iScore);
		lStat.setObject(6, iPercent_scored_peak_intensity);
		lStat.setLong(7, iBackbone_cleavage_score);
		lStat.setLong(8, iNum_unused_ions);
		lStat.setLong(9, iNum_fragment_ions);
		lStat.setObject(10, iReversescore);
		lStat.setObject(11, iReverse_percent_scored_peak_intensity);
		lStat.setObject(12, iDeltaforwardreversescore);
		lStat.setObject(13, iRank2score);
		lStat.setObject(14, iRank2_percent_scored_peak_intensity);
		lStat.setObject(15, iDeltarank1rank2score);
		lStat.setObject(16, iPrevious_aa);
		lStat.setObject(17, iNext_aa);
		lStat.setObject(18, iFragmentionmap);
		lStat.setObject(19, iReversesequence);
		lStat.setObject(20, iRank2sequence);
		lStat.setObject(21, iParent_m_over_z);
		lStat.setLong(22, iParent_charge);
		lStat.setObject(23, iMatched_parent_mass);
		lStat.setObject(24, iDelta_parent_mass);
		lStat.setObject(25, iRetentiontimeconstant);
		lStat.setObject(26, iPeptide_pi);
		lStat.setObject(27, iParent_mass_convert);
		lStat.setObject(28, iCys);
		lStat.setObject(29, iNterm);
		lStat.setObject(30, iCterm);
		lStat.setObject(31, iTolerance_units);
		lStat.setObject(32, iParent_mass_tolerance);
		lStat.setObject(33, iFragment_mass_tolerance);
		lStat.setObject(34, iSearch_type);
		lStat.setLong(35, iNum_seqs_past_parent_filter);
		lStat.setLong(36, iMutation_matrix_off);
		lStat.setLong(37, iStar_ions_off);
		lStat.setObject(38, iParent_shift_type);
		lStat.setObject(39, iParent_shift);
		lStat.setObject(40, iCreationdate);
		lStat.setObject(41, iUsername);
		lStat.setLong(42, iPeptideid);
		int result = lStat.executeUpdate();
		lStat.close();
		this.iUpdated = false;
		return result;
	}


	/**
	 * This method allows the caller to insert the data represented by this
	 * object in a persistent store.
	 *
	 * @param   aConn Connection to the persitent store.
	 */
	public int persist(Connection aConn) throws SQLException {
		PreparedStatement lStat = aConn.prepareStatement("INSERT INTO peptide (peptideid, l_spectrumid, sequence, modified_sequence, score, percent_scored_peak_intensity, backbone_cleavage_score, num_unused_ions, num_fragment_ions, reverseScore, reverse_percent_scored_peak_intensity, deltaForwardReverseScore, rank2Score, rank2_percent_scored_peak_intensity, deltaRank1Rank2Score, previous_aa, next_aa, fragmentIonMap, reverseSequence, rank2Sequence, parent_m_over_z, parent_charge, matched_parent_mass, delta_parent_mass, retentionTimeConstant, peptide_pI, parent_mass_convert, cys, nterm, cterm, tolerance_units, parent_mass_tolerance, fragment_mass_tolerance, search_type, num_seqs_past_parent_filter, mutation_matrix_off, star_ions_off, parent_shift_type, parent_shift, creationdate, modificationdate, username) values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_USER)");
		if(iPeptideid == Long.MIN_VALUE) {
			lStat.setNull(1, 4);
		} else {
			lStat.setLong(1, iPeptideid);
		}
		if(iL_spectrumid == Long.MIN_VALUE) {
			lStat.setNull(2, 4);
		} else {
			lStat.setLong(2, iL_spectrumid);
		}
		if(iSequence == null) {
			lStat.setNull(3, 12);
		} else {
			lStat.setObject(3, iSequence);
		}
		if(iModified_sequence == null) {
			lStat.setNull(4, 12);
		} else {
			lStat.setObject(4, iModified_sequence);
		}
		if(iScore == null) {
			lStat.setNull(5, 3);
		} else {
			lStat.setObject(5, iScore);
		}
		if(iPercent_scored_peak_intensity == null) {
			lStat.setNull(6, 3);
		} else {
			lStat.setObject(6, iPercent_scored_peak_intensity);
		}
		if(iBackbone_cleavage_score == Long.MIN_VALUE) {
			lStat.setNull(7, 4);
		} else {
			lStat.setLong(7, iBackbone_cleavage_score);
		}
		if(iNum_unused_ions == Long.MIN_VALUE) {
			lStat.setNull(8, 4);
		} else {
			lStat.setLong(8, iNum_unused_ions);
		}
		if(iNum_fragment_ions == Long.MIN_VALUE) {
			lStat.setNull(9, 4);
		} else {
			lStat.setLong(9, iNum_fragment_ions);
		}
		if(iReversescore == null) {
			lStat.setNull(10, 3);
		} else {
			lStat.setObject(10, iReversescore);
		}
		if(iReverse_percent_scored_peak_intensity == null) {
			lStat.setNull(11, 3);
		} else {
			lStat.setObject(11, iReverse_percent_scored_peak_intensity);
		}
		if(iDeltaforwardreversescore == null) {
			lStat.setNull(12, 3);
		} else {
			lStat.setObject(12, iDeltaforwardreversescore);
		}
		if(iRank2score == null) {
			lStat.setNull(13, 3);
		} else {
			lStat.setObject(13, iRank2score);
		}
		if(iRank2_percent_scored_peak_intensity == null) {
			lStat.setNull(14, 3);
		} else {
			lStat.setObject(14, iRank2_percent_scored_peak_intensity);
		}
		if(iDeltarank1rank2score == null) {
			lStat.setNull(15, 3);
		} else {
			lStat.setObject(15, iDeltarank1rank2score);
		}
		if(iPrevious_aa == null) {
			lStat.setNull(16, 12);
		} else {
			lStat.setObject(16, iPrevious_aa);
		}
		if(iNext_aa == null) {
			lStat.setNull(17, 12);
		} else {
			lStat.setObject(17, iNext_aa);
		}
		if(iFragmentionmap == null) {
			lStat.setNull(18, 12);
		} else {
			lStat.setObject(18, iFragmentionmap);
		}
		if(iReversesequence == null) {
			lStat.setNull(19, 12);
		} else {
			lStat.setObject(19, iReversesequence);
		}
		if(iRank2sequence == null) {
			lStat.setNull(20, 12);
		} else {
			lStat.setObject(20, iRank2sequence);
		}
		if(iParent_m_over_z == null) {
			lStat.setNull(21, 3);
		} else {
			lStat.setObject(21, iParent_m_over_z);
		}
		if(iParent_charge == Long.MIN_VALUE) {
			lStat.setNull(22, 4);
		} else {
			lStat.setLong(22, iParent_charge);
		}
		if(iMatched_parent_mass == null) {
			lStat.setNull(23, 3);
		} else {
			lStat.setObject(23, iMatched_parent_mass);
		}
		if(iDelta_parent_mass == null) {
			lStat.setNull(24, 3);
		} else {
			lStat.setObject(24, iDelta_parent_mass);
		}
		if(iRetentiontimeconstant == null) {
			lStat.setNull(25, 3);
		} else {
			lStat.setObject(25, iRetentiontimeconstant);
		}
		if(iPeptide_pi == null) {
			lStat.setNull(26, 3);
		} else {
			lStat.setObject(26, iPeptide_pi);
		}
		if(iParent_mass_convert == null) {
			lStat.setNull(27, 12);
		} else {
			lStat.setObject(27, iParent_mass_convert);
		}
		if(iCys == null) {
			lStat.setNull(28, 12);
		} else {
			lStat.setObject(28, iCys);
		}
		if(iNterm == null) {
			lStat.setNull(29, 12);
		} else {
			lStat.setObject(29, iNterm);
		}
		if(iCterm == null) {
			lStat.setNull(30, 12);
		} else {
			lStat.setObject(30, iCterm);
		}
		if(iTolerance_units == null) {
			lStat.setNull(31, 12);
		} else {
			lStat.setObject(31, iTolerance_units);
		}
		if(iParent_mass_tolerance == null) {
			lStat.setNull(32, 3);
		} else {
			lStat.setObject(32, iParent_mass_tolerance);
		}
		if(iFragment_mass_tolerance == null) {
			lStat.setNull(33, 3);
		} else {
			lStat.setObject(33, iFragment_mass_tolerance);
		}
		if(iSearch_type == null) {
			lStat.setNull(34, 12);
		} else {
			lStat.setObject(34, iSearch_type);
		}
		if(iNum_seqs_past_parent_filter == Long.MIN_VALUE) {
			lStat.setNull(35, 4);
		} else {
			lStat.setLong(35, iNum_seqs_past_parent_filter);
		}
		if(iMutation_matrix_off == Long.MIN_VALUE) {
			lStat.setNull(36, 4);
		} else {
			lStat.setLong(36, iMutation_matrix_off);
		}
		if(iStar_ions_off == Long.MIN_VALUE) {
			lStat.setNull(37, 4);
		} else {
			lStat.setLong(37, iStar_ions_off);
		}
		if(iParent_shift_type == null) {
			lStat.setNull(38, 12);
		} else {
			lStat.setObject(38, iParent_shift_type);
		}
		if(iParent_shift == null) {
			lStat.setNull(39, 3);
		} else {
			lStat.setObject(39, iParent_shift);
		}
		int result = lStat.executeUpdate();

		// Retrieving the generated keys (if any).
		ResultSet lrsKeys = lStat.getGeneratedKeys();
		ResultSetMetaData lrsmKeys = lrsKeys.getMetaData();
		int colCount = lrsmKeys.getColumnCount();
		iKeys = new Object[colCount];
		while(lrsKeys.next()) {
			for(int i=0;i<iKeys.length;i++) {
				iKeys[i] = lrsKeys.getObject(i+1);
			}
		}
		lrsKeys.close();
		lStat.close();
		this.iUpdated = false;
		return result;
	}

	/**
	 * This method will return the automatically generated key for the insert if 
	 * one was triggered, or 'null' otherwise.
	 *
	 * @return	Object[]	with the generated keys.
	 */
	public Object[] getGeneratedKeys() {
		return this.iKeys;
	}

}